package cn.com.lutao.singleton;

import java.util.Vector;

/**
 * Created by LT on 2017-09-21.
 */
public class SingletonTest {
    private static SingletonTest singleton = null;
    private Vector properties = null;
    private Vector getProperties(){
        return properties;
    }
    private SingletonTest(){}
    private static synchronized void syncInit(){
        if(singleton == null){
            singleton = new SingletonTest();
        }
    }
    public static SingletonTest getSingleton(){
        if(singleton == null){
            syncInit();
        }
        return singleton;
    }
    public void updateProperties(){
        SingletonTest s = new SingletonTest();
        properties =s.getProperties();
    }
}
